home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / gateway.idb / usr / WebFace / Source / 20-NetworkServices / dhcp / dhcp-netconf.cgi.z / dhcp-netconf.cgi
Encoding:
Text File  |  1997-07-30  |  36.3 KB  |  1,101 lines

  1. #!/usr/bin/perl5
  2.  
  3. require "/usr/OnRamp/lib/OnRamp.pm";
  4. require "/usr/OnRamp/lib/java.pm";
  5. require "dhcp-netconf-js.cgi";
  6. BEGIN { require "/usr/WebFace/lib/CGI.pm"; import CGI; }
  7.  
  8. if (!$ARGV[0]) { printf("Location: %s%c%c","/admin/dhcp-config.cgi",10,10); }
  9.  
  10. $query = new CGI;
  11.  
  12. ($type,$editingIP) = ($ARGV[0] =~ /([a-z]+)(.*)/);
  13.  
  14. $def_config_dir = "/var/dhcp/config";
  15. $defaultFile = "/var/dhcp/config/config.Default";
  16.  
  17. $size = 20;
  18. $wid = 450;
  19.  
  20. $title = "Client Subnet Number: $editingIP";
  21.  
  22.  
  23. &setTypes;
  24. &setHash;
  25.  
  26. if ($type eq 'add') { $fname = $defaultFile; }
  27. else { $fname = $def_config_dir . '/config.' . $editingIP; }
  28.  
  29. &read_config_file($fname);
  30.  
  31. $help = $document_root . $ENV{"SCRIPT_NAME"};
  32. $help =~ s/cgi$/hlp/;
  33. exec $help if ($query->param('help') eq "Help");
  34.  
  35. if ($query->param('save_config') eq 'Ok') { &handleRequest; }
  36.  
  37. print $query->header;
  38.  
  39. &generic;
  40.  
  41. sub
  42. error
  43. {
  44.     print $query->header;
  45.     if ($query->param('adv')) { &js_title_block($title,$js_long); }
  46.     else { &js_title_block($title,$js); }
  47.     &error_block($_[0]);
  48.     &generic;
  49.     exit 0;
  50. }
  51.  
  52. sub
  53. read_config_file
  54. {
  55.     $gname = $_[0];
  56.     $netnum = $gname;
  57.     $netnum =~ s/^.*config\.//;
  58.     open(CONFIG, "<$gname") || &error("Cannot open file $gname for reading.");
  59.  
  60.     while (<CONFIG>) {
  61.     if (/^#/) {
  62.         next;
  63.     }
  64.     chomp;
  65.     /:\s*/ || next;    # Find the first colon, skip line if no colon found
  66.     $left = $`;
  67.     $right = $';
  68.     if ($types{$left} eq "bool") {
  69.         $right =~ s/1/Yes/;
  70.         $right =~ s/0/No/;
  71.         $right =~ s/yes/Yes/;
  72.         $right =~ s/no/No/;
  73.     }
  74.     elsif ($type{$left} eq "quad") {
  75.         $right =~ s/1/Bnode/;
  76.         $right =~ s/0x1/Bnode/;
  77.         $right =~ s/2/Pnode/;
  78.         $right =~ s/0x2/Pnode/;
  79.         $right =~ s/4/Mnode/;
  80.         $right =~ s/0x4/Mnode/;
  81.         $right =~ s/8/Hnode/;
  82.         $right =~ s/0x8/Hnode/;
  83.     }
  84. #    if ($right ne "") {
  85.         $hash{$left} = $right;
  86. #    }
  87.     }
  88.     close(CONFIG);
  89.  
  90.     if ($netnum eq "Default") { $hash{'subnet'} = $editingIP; }
  91.     else { $hash{'subnet'} = $netnum; }
  92. }
  93.  
  94. sub
  95. new_config_file
  96. {
  97.     open(CONFIG, ">$fname") || &error("Cannot open file $fname for writing.");
  98.     @names = $query->param;
  99.     $i = 0;
  100.     while ($names[$i]) {
  101.     if ( ($names[$i] eq "config_file") ||
  102.          ($names[$i] eq "save_config") ||
  103.          ($names[$i] eq "subnet")) {
  104.         $i++;
  105.         next;
  106.     }
  107.     $value = $query->param($names[$i]);
  108.     if ($types{$names[$i]} eq "bool") {
  109.         if ($value eq "Yes") {
  110.         $_ = $names[$i].": 1"."\n";
  111.         }
  112.         else {
  113.         $_ = $names[$i].": 0"."\n";
  114.         }
  115.     }
  116.     elsif ($types{$names[$i]} eq "quad") {
  117.         if ($value eq "Hnode") {
  118.         $_ = $names[$i].": 0x8"."\n";
  119.         }
  120.         elsif ($value eq "Mnode") {
  121.         $_ = $names[$i].": 0x4"."\n";
  122.         }
  123.         elsif ($value eq "Pnode") {
  124.         $_ = $names[$i].": 0x2"."\n";
  125.         }
  126.         else {
  127.         $_ = $names[$i].": 0x1"."\n";
  128.         }
  129.     }
  130.     else {
  131.         $_ = $names[$i].": ".$value."\n";
  132.     }
  133.     print CONFIG $_;
  134.     $i++;
  135.     }
  136.     close(CONFIG);
  137. }
  138.  
  139. sub
  140. save_config_file
  141. {
  142.     $tmpfile = $fname.".tmp";
  143.     open(CONFIG, "<$fname") || &error("Cannot open file $fname for reading.");
  144.     open(CONFIGTMP, ">$tmpfile") || &error("Cannot open file $tmpfile for writing.");
  145.     while (<CONFIG>) {
  146.     if (/^#/) {
  147.         print CONFIGTMP $_;
  148.         next;
  149.     }
  150.     /:\s*/ || next;
  151.  
  152.     while (($key, $value) = each %save_items) {
  153.         if ($key eq "subnet") {
  154.         next;
  155.         }
  156.         if ($` eq $key) {
  157.         if ($types{$key} eq "bool") {
  158.             if ($value eq "Yes") {
  159.             $_ = $key.": 1"."\n";
  160.             }
  161.             else {
  162.             $_ = $key.": 0"."\n";
  163.             }
  164.         }
  165.         elsif ($types{$key} eq "quad") {
  166.             if ($value eq "Hnode") {
  167.             $_ = $key.": 0x8"."\n";
  168.             }
  169.             elsif ($value eq "Mnode") {
  170.             $_ = $key.": 0x4"."\n";
  171.             }
  172.             elsif ($value eq "Pnode") {
  173.             $_ = $key.": 0x2"."\n";
  174.             }
  175.             else {
  176.             $_ = $key.": 0x1"."\n";
  177.             }
  178.         }
  179.         else {
  180.             $_ = $key.": ".$value."\n";
  181.         }
  182.         }
  183.     }
  184.     print CONFIGTMP $_;
  185.     }
  186.     close(CONFIGTMP);
  187.     close(CONFIG);
  188.     rename($tmpfile, $fname);
  189. }
  190.  
  191. sub
  192. check_int
  193. {
  194.     $_[0] =~ s/\s+//g;
  195.     if ($_[0] =~ /^\d+$/) {
  196.         return 0;
  197.     }
  198.     if ($_[1]) {
  199.         &error("Illegal int value: $_[0].");
  200.     }
  201.     return 1;
  202. }
  203.  
  204. sub
  205. check_dhcp_fname
  206. {
  207.     $_[0] =~ s/^\s+//;
  208.     $_[0] =~ s/\s+$//;
  209.     if ($_[0] =~ /^\//) {
  210.     if (-r $_[0]) {
  211.         return 0;
  212.     }
  213.     }
  214.     &error("File is inaccessible: $_[0].");
  215. }
  216.  
  217. sub
  218. check_hname
  219. {
  220.     $_[0] =~ s/^\s+//;
  221.     $_[0] =~ s/\s+$//;
  222.     if ($_[0] =~ /^[a-zA-Z][\w*\-\.]*[a-zA-Z0-9]*$/) {
  223.         if ($_[0] =~ /[_\.\-]$/) {
  224.             &error("The hostname cannot end with a \. or \- or _ : $_[0].");
  225.         }
  226.         if ($_[0] =~ /\.\.|\-\-|__/) {
  227.             &error("The hostname cannot have consecutive \. or \- or _ : $_[0].");
  228.         }
  229.         return 0;
  230.     }
  231.     &error("The name is not a valid hostname: $_[0].");
  232. }
  233.  
  234. sub
  235. check_addr
  236. {
  237.     $_[0] =~ s/^\s+//;
  238.     $_[0] =~ s/\s+$//;
  239.     if ($_[0] =~ /^0x[0-9a-fA-F]+/) {
  240.     if ($_[0] =~ /[^0-9a-fA-Fx]/) {
  241.         &error("Illegal hex notation address: $_[0].");
  242.     }
  243.     return 0;
  244.     }
  245.     else {
  246.     ($a, $b, $c, $d) = split(/\./, $_[0], 4);
  247.     if ( ($a eq "") || ($b eq "") || ($c eq "") || ($d eq "") ) {
  248.         &error("Illegal dot notation address: $_[0].");
  249.         return 1;
  250.     }
  251.     if ( ($a =~ /[^0-9]/) || ($a =~ /[^0-9]/) ||
  252.          ($c =~ /[^0-9]/) || ($d =~ /[^0-9]/) ) {
  253.         &error("Illegal dot notation address: $_[0].");
  254.         return 1;
  255.     }
  256.     if ( ($a < 0) || ($a > 255) || ($b < 0) || ($b > 255) ||
  257.          ($c < 0) || ($c > 255) || ($d < 0) || ($d > 255) ) {
  258.         &error("Illegal dot notation address: $_[0].");
  259.         return 1;
  260.     }
  261.     }
  262.     return 0;
  263. }
  264.  
  265. sub
  266. error_check
  267. {
  268.     if ($types{$_[0]} eq "int") {
  269.         if (check_int($_[1], 1)) {
  270.             return 1;
  271.         }
  272.     }
  273.     elsif ($types{$_[0]} eq "int_list") {
  274.         @intlist = split(/\,/, $_[1]);
  275.         $j = 0;
  276.         while ($intlist[$j]) {
  277.             if (check_int($intlist[$j], 0)) {
  278.                 &error("Illegal int value: " .
  279.                     "$intlist[$j] in list $_[1].");
  280.                 return 1;
  281.             }
  282.             $j += 1;
  283.         }
  284.     }
  285.     elsif ($types{$_[0]} eq "filepath") {
  286.         if (check_dhcp_fname($_[1])) {
  287.             return 1;
  288.         }
  289.     }
  290.     elsif ($types{$_[0]} eq "hname") {
  291.         if (check_hname($_[1])) {
  292.             return 1;
  293.         }
  294.     }
  295.     elsif ($types{$_[0]} eq "addr_range") {
  296.         @rnglist = split(/\,/, $_[1]);
  297.         $j = 0;
  298.         while ($rnglist[$j]) {
  299.             if ($rnglist[$j] =~ /\-$/) {
  300.                 &error("Illegal range value: ".
  301.                     "$rnglist[$k] in list $_[1].");
  302.                 return 1;
  303.             }
  304.             @intlist = split(/\-/, $rnglist[$j]);
  305.             $k = 0;
  306.             while ($intlist[$k]) {
  307.                 if (check_int($intlist[$k], 0)) {
  308.                     &error("Illegal int value: ".
  309.                          "$intlist[$k] in list $_[1].");
  310.                     return 1;
  311.                 }
  312.                 $k += 1;
  313.             }
  314.             if ($k > 2) {
  315.                 &error("Illegal range value: $rnglist[$j]".
  316.                     " in list $_[1].");
  317.                 return 1;
  318.             }
  319.             if ($k == 2) {
  320.                 if ($intlist[0] > $intlist[1]) {
  321.                     &error("Illegal int value: ".
  322.                          "$rnglist[$j] in list $_[1].");
  323.                     return 1;
  324.                 }
  325.             }
  326.             $j += 1;
  327.         }
  328.     }
  329.     elsif ($types{$_[0]} eq "netmask") {
  330.         return 1 if &check_netmask($_[1]); 
  331.     }
  332.     elsif ($types{$_[0]} eq "addr_pairs") {
  333.         @intlist = split(/\,/, $_[1]);
  334.         $j = 0;
  335.         while ($intlist[$j]) {
  336.             ($adr1, $adr2) = split(/\-/, $intlist[$j], 2);
  337.             if ( ($adr1 eq "") || ($adr2 eq "") ){
  338.                 &error("$intlist[$j]" .
  339.                     " is not a valid address pair.");
  340.                 return 1;
  341.             }
  342.             if(check_addr($adr1)) {
  343.                 &error("Illegal address value: ".
  344.                     "$adr1 in address pair $intlist[$j].");
  345.                 return 1;
  346.             }
  347.             if(check_addr($adr2)) {
  348.                 &error("Illegal address value: ".
  349.                     "$adr2 in address pair $intlist[$j].");
  350.                 return 1;
  351.             }
  352.             $j += 1;
  353.         }
  354.     }
  355.     elsif ($types{$_[0]} eq "addr") {
  356.         if (check_addr($_[1])) {
  357.             return 1;
  358.         }
  359.     }
  360.     elsif ($types{$_[0]} eq "addr_list") {
  361.         @intlist = split(/\,/, $_[1]);
  362.         $j = 0;
  363.         while ($intlist[$j]) {
  364.             if (check_addr($intlist[$j])) {
  365.                 &error("Illegal address value: ".
  366.                     "$intlist[$j] in list $_[1].");
  367.                 return 1;
  368.             }
  369.             $j += 1;
  370.         }
  371.     }
  372.     elsif ($types{$_[0]} eq "string") {
  373.         return 0;
  374.     }
  375.  
  376.     return 0;
  377. }
  378.  
  379. sub setTypes {
  380.     $types{"Serve_This_Network"} = "bool";
  381.     $types{"pro_choose_name"} = "bool";
  382.     $types{"pro_IPforwarding"} = "bool";
  383.     $types{"pro_source_routing"} = "bool";
  384.     $types{"pro_allnets_local"} = "bool";
  385.     $types{"pro_domask_disc"} = "bool";
  386.     $types{"pro_resp_mask_req"} = "bool";
  387.     $types{"pro_do_router_disc"} = "bool";
  388.     $types{"pro_trailer_encaps"} = "bool";
  389.     $types{"pro_ether_encaps"} = "bool";
  390.     $types{"pro_TCP_keepalive_garbage"} = "bool";
  391.  
  392.     $types{"pro_address_counter"} = "int";
  393.     $types{"pro_host_pfx_counter"} = "int";
  394.     $types{"pro_lease"} = "int";
  395.     $types{"pro_bootfile_size"} = "int";
  396.     $types{"pro_time_offset"} = "int";
  397.     $types{"pro_max_reassy_size"} = "int";
  398.     $types{"pro_IP_ttl"} = "int";
  399.     $types{"pro_pathmtu_timeout"} = "int";
  400.     $types{"pro_mtu"} = "int";
  401.     $types{"pro_arpcache_timeout"} = "int";
  402.     $types{"pro_TCP_ttl"} = "int";
  403.     $types{"pro_TCP_keepalive_intrvl"} = "int";
  404.  
  405.     $types{"pro_pathmtu_table"} = "int_list";
  406.  
  407.     $types{"pro_meritdump_pathname"} = "filepath";
  408.     $types{"pro_root_pathname"} = "filepath";
  409.     $types{"pro_extensions_pathname"} = "filepath";
  410.     $types{"pro_bootfile_name"} = "filepath";
  411.  
  412.     $types{"pro_host_prefix"} = "hname";
  413.     $types{"pro_TFTPserver_name"} = "hname";
  414.     $types{"pro_dns_domain"} = "hname";
  415.     $types{"pro_nis_domain"} = "hname";
  416.     $types{"pro_nisplus_domain"} = "hname";
  417.  
  418.     $types{"pro_ipaddress_range"} = "addr_range";
  419.  
  420.     $types{"pro_static_routes"} = "addr_pairs";
  421.     $types{"pro_policy_filter"} = "addr_pairs";
  422.  
  423.     $types{"subnet"} = "addr";
  424.     $types{"pro_netmask"} = "netmask";
  425.     $types{"pro_propel_server"} = "addr";
  426.     $types{"pro_broadcast"} = "addr";
  427.     $types{"pro_router_solicit_addr"} = "addr";
  428.  
  429.     $types{"pro_router_addr"} = "addr_list";
  430.     $types{"pro_dnsserver_addr"} = "addr_list";
  431.     $types{"pro_timeserver_addr"} = "addr_list";
  432.     $types{"pro_logserver_addr"} = "addr_list";
  433.     $types{"pro_cookieserver_addr"} = "addr_list";
  434.     $types{"pro_LPRserver_addr"} = "addr_list";
  435.     $types{"pro_resourceserver_addr"} = "addr_list";
  436.     $types{"pro_swapserver_addr"} = "addr_list";
  437.     $types{"pro_nameserver116_addr"} = "addr_list";
  438.     $types{"pro_impressserver_addr"} = "addr_list";
  439.     $types{"pro_NTPserver_addr"} = "addr_list";
  440.     $types{"pro_X_fontserver_addr"} = "addr_list";
  441.     $types{"pro_X_displaymgr_addr"} = "addr_list";
  442.     $types{"pro_mobileIP_homeagent_addr"} = "addr_list";
  443.     $types{"pro_SMTPserver_addr"} = "addr_list";
  444.     $types{"pro_POP3server_addr"} = "addr_list";
  445.     $types{"pro_NNTPserver_addr"} = "addr_list";
  446.     $types{"pro_WWWserver_addr"} = "addr_list";
  447.     $types{"pro_fingerserver_addr"} = "addr_list";
  448.     $types{"pro_IRCserver_addr"} = "addr_list";
  449.     $types{"pro_StreetTalkserver_addr"} = "addr_list";
  450.     $types{"pro_STDAserver_addr"} = "addr_list";
  451.     $types{"pro_NetBIOS_nameserver_addr"} = "addr_list";
  452.     $types{"pro_NetBIOS_distrserver_addr"} = "addr_list";
  453.     $types{"pro_nisserver_addr"} = "addr_list";
  454.     $types{"pro_nisplusserver_addr"} = "addr_list";
  455.  
  456.     $types{"pro_NetBIOS_scope"} = "string";
  457.  
  458.     $types{"pro_NetBIOS_nodetype"} = "quad";
  459. }
  460.  
  461. sub handleRequest {
  462.     undef %array;
  463.     open(IN,"< $theFile");
  464.     while(<IN>) {
  465.     @items = split(/\s+/);
  466.     if (substr($items[0],0,1) eq "#") { next; }
  467.     chop($items[0]); chop($items[1]);
  468.     $array{$items[0]} = $items[1];
  469.     }
  470.     close(IN);
  471.  
  472.     @names = $query->param;
  473.     $fname = $query->param('config_file');
  474. #    if (-e $fname) { $file = $fname; }
  475. #    else { $file = $defaultFile; }
  476.     &read_config_file($defaultFile);
  477. foreach $arg (keys(%hash)) { print "$arg $hash{$arg}<br>"; }
  478.     %save_items = %hash;
  479.     foreach $arg (@names) {
  480.     if ( ($arg eq "config_file") ||
  481.          ($arg eq "save_config") ) {
  482.         next;
  483.     }
  484.     $old = $hash{$arg};
  485.     $new = $query->param($arg);
  486.     if ($new && $old ne $new) {
  487.         if ($types{$arg} eq "bool") {
  488.         if ( (($old eq "") || ($old eq "0") || ($old eq "no")) &&
  489.              ($new eq "No") ) {
  490.             $i += 1;
  491.             next;
  492.         }
  493.         if ( (($old eq "1") || ($old eq "yes")) &&
  494.              ($new eq "Yes") ) {
  495.             $i += 1;
  496.             next;
  497.         }
  498.         }
  499.         elsif ($types{$arg} eq "quad") {
  500.         if ( ((($old eq "") || ($old eq "1")) && ($new eq "Bnode")) ||
  501.              (($old eq "2") && ($new eq "Pnode")) ||
  502.              (($old eq "4") && ($new eq "Mnode")) ||
  503.              (($old eq "8") && ($new eq "Hnode")) ) {
  504.             $i += 1;
  505.             next;
  506.         }
  507.         }
  508.         if (error_check($arg, $new)) {
  509.         &error("Input error");
  510.         }
  511.         $save_items{$arg} = $new;
  512.     }
  513.     }
  514.  
  515.     if (1 || $query->param('save_config') eq "Ok") {
  516.     # Save the File now
  517.     if ($type eq 'add') {
  518.         $fname = $def_config_dir . '/config.' . $editingIP;
  519.         system("/sbin/cp, $defaultFile, $fname);
  520.         &save_config_file;
  521.     } elsif ( ($a1 = $save_items{"subnet"}) ne "") {
  522.         # This probably is a new file so need to write everything if so
  523.         $fname =~ s/config\..*/config.$a1/;
  524.         if (-e $fname) {
  525.         save_config_file;
  526.         }
  527.         else {
  528.         save_config_file;
  529.         }
  530.     } else {
  531.         save_config_file;
  532.     }
  533.     $message = "The configuration file $fname has been saved.";
  534.     }
  535.     elsif ($query->param('save_config') eq "Delete") {
  536.     $message = "The configuration file $fname has been deleted.";
  537.     }
  538.     $file = "dhcp-config.cgi" . "?$type";
  539.     redirect($file);
  540.     exit(0);
  541. }
  542.  
  543. sub setHash {
  544.     $hash{"Serve_This_Network"} = $query->param('Serve_This_Network') ?
  545.     $query->param('Serve_This_Network') : 'No';
  546.     $hash{"pro_choose_name"} = $query->param('pro_choose_name') ?
  547.     $query->param('pro_choose_name') : 'No';
  548.     $hash{"pro_host_prefix"} = $query->param('pro_host_prefix') ?
  549.     $query->param('pro_host_prefix') : '';
  550.     $hash{"pro_netmask"} = $query->param('pro_netmask') ?
  551.     $query->param('pro_netmask') : '';
  552.     $hash{"pro_ipaddress_range"} = $query->param('pro_ipaddress_range') ?
  553.     $query->param('pro_ipaddress_range') : '';
  554.     $hash{"pro_nis_domain"} = $query->param('pro_nis_domain') ?
  555.     $query->param('pro_nis_domain') : '';
  556.     $hash{"pro_pathmtu_timeout"} = $query->param('pro_pathmtu_timeout') ?
  557.     $query->param('pro_pathmtu_timeout') : '';
  558.  
  559.     $hash{"pro_IPforwarding"} = "No";
  560.     $hash{"pro_source_routing"} = "No";
  561.     $hash{"pro_allnets_local"} = "No";
  562.     $hash{"pro_domask_disc"} = "No";
  563.     $hash{"pro_resp_mask_req"} = "No";
  564.     $hash{"pro_do_router_disc"} = "No";
  565.     $hash{"pro_trailer_encaps"} = "No";
  566.     $hash{"pro_ether_encaps"} = "No";
  567.     $hash{"pro_TCP_keepalive_garbage"} = "No";
  568.  
  569.     $hash{"pro_NetBIOS_nodetype"} = "Bnode";
  570. }
  571.  
  572. sub generic {
  573.     if ($query->param('adv')) { &longform; }
  574.     else { &shortform; }
  575. }
  576.  
  577. sub longform {
  578.     &js_title_block($title,$js_long);
  579.     &header_block($title);
  580.  
  581.     print "<i>$message</i>";
  582.  
  583.     print $query->startform("POST", "", "", "NAME=StandardForm", "onSubmit=\"return runSubmit()\"");
  584.  
  585.     print $query->hidden(-name=>'adv', -default=>'Yes');
  586.  
  587.     print $query->hidden(-name=>'config_file', -default=>$fname);
  588.  
  589.     print "<center><strong>Enable DHCP service for this network: \n",
  590.       $query->radio_group(-name=>'Serve_This_Network',
  591.               -values=>['Yes','No'],
  592.               -default=>$hash{"Serve_This_Network"}),
  593.       "</strong></center>\n";
  594.  
  595.     print "<h3>General Options:</h3>";
  596.     print "<center><table cellpadding=5 width=$wid>\n";
  597.     print "<tr><th align=left>Allow clients to choose their own hostname:\n",
  598.       "<th align=left>",
  599.       $query->radio_group(-name=>'pro_choose_name',
  600.               -values=>['Yes','No'],
  601.               -default=>$hash{"pro_choose_name"}),
  602.       "</tr>";
  603.     print "<tr><th align=left>Starting number for new IP Address:\n",
  604.       "<th align=left>",
  605.       $query->textfield(-name=>'pro_address_counter',
  606.             -default=>$hash{"pro_address_counter"},
  607.             -size=>$size, -maxlength=>5),
  608.       "</tr>";
  609.     print "<tr><th align=left>Prefix for automatic hostname assignments:\n",
  610.       "<th align=left>",
  611.       $query->textfield(-name=>'pro_host_prefix',
  612.             -default=>$hash{"pro_host_prefix"},
  613.             -size=>$size, -maxlength=>7),
  614.       "</tr>";
  615.     print "<tr><th align=left>Starting number to append to Hostname Prefix:\n",
  616.       "<th align=left>",
  617.       $query->textfield(-name=>'pro_host_pfx_counter',
  618.             -default=>$hash{"pro_host_pfx_counter"},
  619.             -size=>$size, -maxlength=>5),
  620.       "</tr>";
  621.     print "<tr><th align=left>Subnet mask for this network:\n",
  622.       "<th align=left>",
  623.       $query->textfield(-name=>'pro_netmask',
  624.             -default=>$hash{"pro_netmask"},
  625.             -size=>$size, -maxlength=>16),
  626.       "</tr>";
  627.     print "<tr><th align=left>Maximum allowable address Lease in seconds:\n",
  628.       "<th align=left>",
  629.       $query->textfield(-name=>'pro_lease',
  630.             -default=>$hash{"pro_lease"},
  631.             -size=>$size, -maxlength=>16),
  632.       "</tr>";
  633.     print "<tr><th align=left>Generate new IP addresses from this range:\n",
  634.       "<th align=left>",
  635.       $query->textfield(-name=>'pro_ipaddress_range',
  636.             -default=>$hash{"pro_ipaddress_range"},
  637.             -size=>$size, -maxlength=>256),
  638.       "</tr>";
  639.     print "<tr><th align=left>List of IP Addresses for Routers:\n",
  640.       "<th align=left>",
  641.       $query->textfield(-name=>'pro_router_addr',
  642.             -default=>$hash{"pro_router_addr"},
  643.             -size=>$size, -maxlength=>256),
  644.       "</tr>";
  645.     print "<tr><th align=left>Bootfile Size (in 512-Octet blocks):\n",
  646.       "<th align=left>",
  647.       $query->textfield(-name=>'pro_bootfile_size',
  648.             -default=>$hash{"pro_bootfile_size"},
  649.             -size=>$size, -maxlength=>8),
  650.       "</tr>";
  651.     print "<tr><th align=left>Bootfile Name:\n",
  652.       "<th align=left>",
  653.       $query->textfield(-name=>'pro_bootfile_name',
  654.             -default=>$hash{"pro_bootfile_name"},
  655.             -size=>$size, -maxlength=>256),
  656.       "</tr>";
  657.     print "<tr><th align=left>Time Offset from UTC (in seconds):\n",
  658.       "<th align=left>",
  659.       $query->textfield(-name=>'pro_time_offset',
  660.             -default=>$hash{"pro_time_offset"},
  661.             -size=>$size, -maxlength=>16),
  662.       "</tr>";
  663.     print "<tr><th align=left>Merit Dump File Pathname:\n",
  664.       "<th align=left>",
  665.       $query->textfield(-name=>'pro_meritdump_pathname',
  666.             -default=>$hash{"pro_meritdump_pathname"},
  667.             -size=>$size, -maxlength=>256),
  668.       "</tr>";
  669.     print "<tr><th align=left>Root Disk Pathname:\n",
  670.       "<th align=left>",
  671.       $query->textfield(-name=>'pro_root_pathname',
  672.             -default=>$hash{"pro_root_pathname"},
  673.             -size=>$size, -maxlength=>256),
  674.       "</tr>";
  675.     print "<tr><th align=left>Extensions Pathname:\n",
  676.       "<th align=left>",
  677.       $query->textfield(-name=>'pro_extensions_pathname',
  678.             -default=>$hash{"pro_extensions_pathname"},
  679.             -size=>$size, -maxlength=>256),
  680.       "</tr>";
  681.     print "<tr><th align=left>TFTP Server Name:\n",
  682.       "<th align=left>",
  683.       $query->textfield(-name=>'pro_TFTPserver_name',
  684.             -default=>$hash{"pro_TFTPserver_name"},
  685.             -size=>$size, -maxlength=>256),
  686.       "</tr></table>";
  687.  
  688.     print "</center><h3>Server related options:</h3><center>";
  689.     print "<table cellpadding=5 width=$wid>\n";
  690.  
  691.     print "<tr><th align=left>NIS domain name for this network:\n",
  692.       "<th align=left>",
  693.       $query->textfield(-name=>'pro_dns_domain',
  694.             -default=>$hash{"pro_dns_domain"},
  695.             -size=>$size, -maxlength=>256),
  696.       "</tr>";
  697.     print "<tr><th align=left>List of DNS Server IP Addresses:\n",
  698.       "<th align=left>",
  699.       $query->textfield(-name=>'pro_dnsserver_addr',
  700.             -default=>$hash{"pro_dnsserver_addr"},
  701.             -size=>$size, -maxlength=>256),
  702.       "</tr>";
  703.     print "<tr><th align=left>Propel Server IP Address:\n",
  704.       "<th align=left>",
  705.       $query->textfield(-name=>'pro_propel_server',
  706.             -default=>$hash{"pro_propel_server"},
  707.             -size=>$size, -maxlength=>256),
  708.       "</tr>";
  709.     print "<tr><th align=left>List of Time Server IP Addresses:\n",
  710.       "<th align=left>",
  711.       $query->textfield(-name=>'pro_timeserver_addr',
  712.             -default=>$hash{"pro_timeserver_addr"},
  713.             -size=>$size, -maxlength=>256),
  714.       "</tr>";
  715.     print "<tr><th align=left>List of UDP Log Server IP Addresses:\n",
  716.       "<th align=left>",
  717.       $query->textfield(-name=>'pro_logserver_addr',
  718.             -default=>$hash{"pro_logserver_addr"},
  719.             -size=>$size, -maxlength=>256),
  720.       "</tr>";
  721.     print "<tr><th align=left>List of Cookie Server IP Addresses:\n",
  722.       "<th align=left>",
  723.       $query->textfield(-name=>'pro_cookieserver_addr',
  724.             -default=>$hash{"pro_cookieserver_addr"},
  725.             -size=>$size, -maxlength=>256),
  726.       "</tr>";
  727.     print "<tr><th align=left>List of LPR Server IP Addresses:\n",
  728.       "<th align=left>",
  729.       $query->textfield(-name=>'pro_LPRserver_addr',
  730.             -default=>$hash{"pro_LPRserver_addr"},
  731.             -size=>$size, -maxlength=>256),
  732.       "</tr>";
  733.     print "<tr><th align=left>List of Service Location Server IP Addresses:\n",
  734.       "<th align=left>",
  735.       $query->textfield(-name=>'pro_resourceserver_addr',
  736.             -default=>$hash{"pro_resourceserver_addr"},
  737.             -size=>$size, -maxlength=>256),
  738.       "</tr>";
  739.     print "<tr><th align=left>Swap Server IP Address:\n",
  740.       "<th align=left>",
  741.       $query->textfield(-name=>'pro_swapserver_addr',
  742.             -default=>$hash{"pro_swapserver_addr"},
  743.             -size=>$size, -maxlength=>256),
  744.       "</tr>";
  745.     print "<tr><th align=left>List of IEN 116 Name Server IP Addresses:\n",
  746.       "<th align=left>",
  747.       $query->textfield(-name=>'pro_nameserver116_addr',
  748.             -default=>$hash{"pro_nameserver116_addr"},
  749.             -size=>$size, -maxlength=>256),
  750.       "</tr>";
  751.     print "<tr><th align=left>List of Impress Server IP Addresses:\n",
  752.       "<th align=left>",
  753.       $query->textfield(-name=>'pro_impressserver_addr',
  754.             -default=>$hash{"pro_impressserver_addr"},
  755.             -size=>$size, -maxlength=>256),
  756.       "</tr>";
  757.     print "<tr><th align=left>List of NTP Server IP Addresses:\n",
  758.       "<th align=left>",
  759.       $query->textfield(-name=>'pro_NTPserver_addr',
  760.             -default=>$hash{"pro_NTPserver_addr"},
  761.             -size=>$size, -maxlength=>256),
  762.       "</tr></table>";
  763.  
  764.     print "</center><h3>Application options:</h3><center>";
  765.     print "<table cellpadding=5 width=$wid>\n";
  766.  
  767.     print "<tr><th align=left>List of X Window Font Server IP Addresses:\n",
  768.       "<th align=left>",
  769.       $query->textfield(-name=>'pro_X_fontserver_addr',
  770.             -default=>$hash{"pro_X_fontserver_addr"},
  771.             -size=>$size, -maxlength=>256),
  772.       "</tr>";
  773.     print "<tr><th align=left>List of X Window Mgr Server IP Addresses:\n",
  774.       "<th align=left>",
  775.       $query->textfield(-name=>'pro_X_displaymgr_addr',
  776.             -default=>$hash{"pro_X_displaymgr_addr"},
  777.             -size=>$size, -maxlength=>256),
  778.       "</tr>";
  779.     print "<tr><th align=left>List of Mobile Home Agent Server IP Addresses:\n",
  780.       "<th align=left>",
  781.       $query->textfield(-name=>'pro_mobileIP_homeagent_addr',
  782.             -default=>$hash{"pro_mobileIP_homeagent_addr"},
  783.             -size=>$size, -maxlength=>256),
  784.       "</tr>";
  785.     print "<tr><th align=left>List of SMTP Server IP Addresses:\n",
  786.       "<th align=left>",
  787.       $query->textfield(-name=>'pro_SMTPserver_addr',
  788.             -default=>$hash{"pro_SMTPserver_addr"},
  789.             -size=>$size, -maxlength=>256),
  790.       "</tr>";
  791.     print "<tr><th align=left>List of POP3 Server IP Addresses:\n",
  792.       "<th align=left>",
  793.       $query->textfield(-name=>'pro_POP3server_addr',
  794.             -default=>$hash{"pro_POP3server_addr"},
  795.             -size=>$size, -maxlength=>256),
  796.       "</tr>";
  797.     print "<tr><th align=left>List of NNTP Server IP Addresses:\n",
  798.       "<th align=left>",
  799.       $query->textfield(-name=>'pro_NNTPserver_addr',
  800.             -default=>$hash{"pro_NNTPserver_addr"},
  801.             -size=>$size, -maxlength=>256),
  802.       "</tr>";
  803.     print "<tr><th align=left>List of WWW Server IP Addresses:\n",
  804.       "<th align=left>",
  805.       $query->textfield(-name=>'pro_WWWserver_addr',
  806.             -default=>$hash{"pro_WWWserver_addr"},
  807.             -size=>$size, -maxlength=>256),
  808.       "</tr>";
  809.     print "<tr><th align=left>List of Finger Server IP Addresses:\n",
  810.       "<th align=left>",
  811.       $query->textfield(-name=>'pro_fingerserver_addr',
  812.             -default=>$hash{"pro_fingerserver_addr"},
  813.             -size=>$size, -maxlength=>256),
  814.       "</tr>";
  815.     print "<tr><th align=left>List of Internet Chat Server IP Addresses:\n",
  816.       "<th align=left>",
  817.       $query->textfield(-name=>'pro_IRCserver_addr',
  818.             -default=>$hash{"pro_IRCserver_addr"},
  819.             -size=>$size, -maxlength=>256),
  820.       "</tr>";
  821.     print "<tr><th align=left>List of StreetTalk Server IP Addresses:\n",
  822.       "<th align=left>",
  823.       $query->textfield(-name=>'pro_StreetTalkserver_addr',
  824.             -default=>$hash{"pro_StreetTalkserver_addr"},
  825.             -size=>$size, -maxlength=>256),
  826.       "</tr>";
  827.     print "<tr><th align=left>List of STDA (StreetTalk) Server IP Addresses:\n",
  828.       "<th align=left>",
  829.       $query->textfield(-name=>'pro_STDAserver_addr',
  830.             -default=>$hash{"pro_STDAserver_addr"},
  831.             -size=>$size, -maxlength=>256),
  832.       "</tr></table>";
  833.  
  834.     print "</center><h3>Services options:</h3><center>";
  835.     print "<table cellpadding=5 width=$wid>\n";
  836.  
  837.     print "<tr><th align=left>List of NetBIOS Name Server IP Addresses:\n",
  838.       "<th align=left>",
  839.       $query->textfield(-name=>'pro_NetBIOS_nameserver_addr',
  840.             -default=>$hash{"pro_NetBIOS_nameserver_addr"},
  841.             -size=>$size, -maxlength=>256),
  842.       "</tr>";
  843.     print "<tr><th align=left>List of NetBIOS Dist Server IP Addresses:\n",
  844.       "<th align=left>",
  845.       $query->textfield(-name=>'pro_NetBIOS_distrserver_addr',
  846.             -default=>$hash{"pro_NetBIOS_distrserver_addr"},
  847.             -size=>$size, -maxlength=>256),
  848.       "</tr>";
  849.     print "<tr><th align=left>NetBIOS over TCP/IP Scope Option:\n",
  850.       "<th align=left>",
  851.       $query->textfield(-name=>'pro_NetBIOS_scope',
  852.             -default=>$hash{"pro_NetBIOS_scope"},
  853.             -size=>$size, -maxlength=>256),
  854.       "</tr>";
  855.     print "<tr><th align=left>NIS Domain Name:\n",
  856.       "<th align=left>",
  857.       $query->textfield(-name=>'pro_nis_domain',
  858.             -default=>$hash{"pro_nis_domain"},
  859.             -size=>$size, -maxlength=>256),
  860.       "</tr>";
  861.     print "<tr><th align=left>List of NIS Server IP Addresses:\n",
  862.       "<th align=left>",
  863.       $query->textfield(-name=>'pro_nisserver_addr',
  864.             -default=>$hash{"pro_nisserver_addr"},
  865.             -size=>$size, -maxlength=>256),
  866.       "</tr>";
  867.     print "<tr><th align=left>NIS+ Domain Name:\n",
  868.       "<th align=left>",
  869.       $query->textfield(-name=>'pro_nisplus_domain',
  870.             -default=>$hash{"pro_nisplus_domain"},
  871.             -size=>$size, -maxlength=>256),
  872.       "</tr>";
  873.     print "<tr><th align=left>List of NIS+ Server IP Addresses:\n",
  874.       "<th align=left>",
  875.       $query->textfield(-name=>'pro_nisplusserver_addr',
  876.             -default=>$hash{"pro_nisplusserver_addr"},
  877.             -size=>$size, -maxlength=>256),
  878.       "</tr></table>";
  879.     print "<table cellpadding=5 width=$wid>\n";
  880.     print "<tr><th align=left>NetBIOS over TCP/IP Node Type Option:\n",
  881.       "<th align=left>",
  882.       $query->radio_group(-name=>'pro_NetBIOS_nodetype',
  883.               -values=>['Bnode','Pnode', 'Mnode', 'Hnode'],
  884.               -default=>$hash{"pro_NetBIOS_nodetype"}),
  885.       "</tr></table>";
  886.  
  887.     print "</center><h3>IP per host options:</h3><center>";
  888.     print "<table cellpadding=5 width=$wid>\n";
  889.  
  890.     print "<tr><th align=left>Perform IP Forwarding:\n",
  891.       "<th align=left>",
  892.       $query->radio_group(-name=>'pro_IPforwarding',
  893.               -values=>['Yes', 'No'],
  894.               -default=>$hash{"pro_IPforwarding"}),
  895.       "</tr>";
  896.     print "<tr><th align=left>Perform Non-Local Source Routing:",
  897.       "<th align=left>",
  898.       $query->radio_group(-name=>'pro_source_routing',
  899.               -values=>['Yes', 'No'],
  900.               -default=>$hash{"pro_source_routing"}),
  901.       "</tr>";
  902.     print "<tr><th align=left>Source Routing Policy Filters (Addr-Mask pairs):\n",
  903.       "<th align=left>",
  904.       $query->textfield(-name=>'pro_policy_filter',
  905.             -default=>$hash{"pro_policy_filter"},
  906.             -size=>$size, -maxlength=>512),
  907.       "</tr>";
  908.     print "<tr><th align=left>Maximum Datagram Reassembly Size (> 576):\n",
  909.       "<th align=left>",
  910.       $query->textfield(-name=>'pro_max_reassy_size',
  911.             -default=>$hash{"pro_max_reassy_size"},
  912.             -size=>$size, -maxlength=>6),
  913.       "</tr>";
  914.     print "<tr><th align=left>Default IP Time To Live (1-255):\n",
  915.       "<th align=left>",
  916.       $query->textfield(-name=>'pro_IP_ttl',
  917.             -default=>$hash{"pro_IP_ttl"},
  918.             -size=>$size, -maxlength=>3),
  919.       "</tr>";
  920.     print "<tr><th align=left>Path MTU Aging Timeout (Seconds):\n",
  921.       "<th align=left>",
  922.       $query->textfield(-name=>'pro_pathmtu_timeout',
  923.             -default=>$hash{"pro_pathmtu_timeout"},
  924.             -size=>$size, -maxlength=>16),
  925.       "</tr>";
  926.     print "<tr><th align=left>List of MTU's for MTU Path Discovery:\n",
  927.       "<th align=left>",
  928.       $query->textfield(-name=>'pro_pathmtu_table',
  929.             -default=>$hash{"pro_pathmtu_table"},
  930.             -size=>$size, -maxlength=>256),
  931.       "</tr></table>";
  932.  
  933.     print "</center><h3>IP per interface options:</h3><center>";
  934.     print "<table cellpadding=5 width=$wid>\n";
  935.  
  936.     print "<tr><th align=left>MTU for the Interface (> 68):\n",
  937.       "<th align=left>",
  938.       $query->textfield(-name=>'pro_mtu',
  939.             -default=>$hash{"pro_mtu"},
  940.             -size=>$size, -maxlength=>6),
  941.       "</tr>";
  942.     print "<tr><th align=left>All Subnets are Local:\n",
  943.       "<th align=left>",
  944.       $query->radio_group(-name=>'pro_allnets_local',
  945.               -values=>['Yes', 'No'],
  946.               -default=>$hash{"pro_allnets_local"}),
  947.       "</tr>";
  948.     print "<tr><th align=left>Broadcast IP Address:\n",
  949.       "<th align=left>",
  950.       $query->textfield(-name=>'pro_broadcast',
  951.             -default=>$hash{"pro_broadcast"},
  952.             -size=>$size, -maxlength=>16),
  953.       "</tr>";
  954.     print "<tr><th align=left>Perform Mask Discovery:\n",
  955.       "<th align=left>",
  956.       $query->radio_group(-name=>'pro_domask_disc',
  957.               -values=>['Yes', 'No'],
  958.               -default=>$hash{"pro_domask_disc"}),
  959.       "</tr>";
  960.     print "<tr><th align=left>Respond to Subnet Mask requests using ICMP:\n",
  961.       "<th align=left>",
  962.       $query->radio_group(-name=>'pro_resp_mask_req',
  963.               -values=>['Yes', 'No'],
  964.               -default=>$hash{"pro_resp_mask_req"}),
  965.       "</tr>";
  966.     print "<tr><th align=left>Perform Router Discovery:\n",
  967.       "<th align=left>",
  968.       $query->radio_group(-name=>'pro_do_router_disc',
  969.               -values=>['Yes', 'No'],
  970.               -default=>$hash{"pro_do_router_disc"}),
  971.       "</tr>";
  972.     print "<tr><th align=left>Router Solicitation IP Address:\n",
  973.       "<th align=left>",
  974.       $query->textfield(-name=>'pro_router_solicit_addr',
  975.             -default=>$hash{"pro_router_solicit_addr"},
  976.             -size=>$size, -maxlength=>16),
  977.       "</tr>";
  978.     print "<tr><th align=left>Static Routes (pairs of dest-router addrs):\n",
  979.       "<th align=left>",
  980.       $query->textfield(-name=>'pro_static_routes',
  981.             -default=>$hash{"pro_static_routes"},
  982.             -size=>$size, -maxlength=>512),
  983.       "</tr></table>";
  984.  
  985.     print "</center><h3>Link layer per interface options:</h3><center>";
  986.     print "<table cellpadding=5 width=$wid>\n";
  987.  
  988.     print "<tr><th align=left>Perform Trailer Encapsulation:\n",
  989.       "<th align=left>",
  990.       $query->radio_group(-name=>'pro_trailer_encaps',
  991.               -values=>['Yes', 'No'],
  992.               -default=>$hash{"pro_trailer_encaps"}),
  993.       "</tr>";
  994.     print "<tr><th align=left>Perform Ethernet Encapsulation:\n",
  995.       "<th align=left>",
  996.       $query->radio_group(-name=>'pro_ether_encaps',
  997.               -values=>['Yes', 'No'],
  998.               -default=>$hash{"pro_ether_encaps"}),
  999.       "</tr>";
  1000.     print "<tr><th align=left>ARP Cache Timeout (Seconds):\n",
  1001.       "<th align=left>",
  1002.       $query->textfield(-name=>'pro_arpcache_timeout',
  1003.             -default=>$hash{"pro_arpcache_timeout"},
  1004.             -size=>$size, -maxlength=>16),
  1005.       "</tr></table>";
  1006.  
  1007.     print "</center><h3>TCP options:</h3><center>";
  1008.     print "<table cellpadding=5 width=$wid>\n";
  1009.  
  1010.     print "<tr><th align=left>TCP Default Time To Live (1-255):\n",
  1011.       "<th align=left>",
  1012.       $query->textfield(-name=>'pro_TCP_ttl',
  1013.             -default=>$hash{"pro_TCP_ttl"},
  1014.             -size=>$size, -maxlength=>4),
  1015.       "</tr>";
  1016.     print "<tr><th align=left>TCP KeepAlive Interval (Seconds):\n",
  1017.       "<th align=left>",
  1018.       $query->textfield(-name=>'pro_TCP_keepalive_intrvl',
  1019.             -default=>$hash{"pro_TCP_keepalive_intrvl"},
  1020.             -size=>$size, -maxlength=>16),
  1021.       "</tr>";
  1022.     print "<tr><th align=left>TCP KeepAlive Garbage Option:\n",
  1023.       "<th align=left>",
  1024.       $query->radio_group(-name=>'pro_TCP_keepalive_garbage',
  1025.               -values=>['Yes', 'No'],
  1026.               -default=>$hash{"pro_TCP_keepalive_garbage"}),
  1027.       "</tr></table><br>\n";
  1028.  
  1029.     print &js_buttons('save_config','Ok','onClick="markOK()"','onClick="markOther()"');
  1030.  
  1031.     print $query->endform;
  1032. }
  1033.  
  1034. sub shortform {
  1035.     &js_title_block($title,$js);
  1036.     &header_block($title);
  1037.  
  1038.     print "<i>$message</i>";
  1039.  
  1040.     print "<h3>Basic Options:</h3>";
  1041.  
  1042.     print $query->startform("POST", "", "", "NAME=StandardForm", "onSubmit=\"return runSubmit(this.form)\"");
  1043.  
  1044.     print $query->hidden(-name=>'config_file', -default=>$fname);
  1045.  
  1046.     print "<center><table cellpadding=5 width=$wid>\n";
  1047.     print "<tr><th align=left>Enable DHCP service for this network:\n",
  1048.       "<th align=left>",
  1049.       $query->radio_group(-name=>'Serve_This_Network',
  1050.               -values=>['Yes','No'],
  1051.               -default=>$hash{"Serve_This_Network"}),
  1052.       "</tr>\n";
  1053.  
  1054.     print "<tr><th align=left>Allow clients to choose their own hostname:\n",
  1055.       "<th align=left>",
  1056.       $query->radio_group(-name=>'pro_choose_name',
  1057.               -values=>['Yes','No'],
  1058.               -default=>$hash{"pro_choose_name"}),
  1059.       "</tr>";
  1060.  
  1061.     print "<tr><th align=left>Prefix for automatic hostname assignments:\n",
  1062.       "<th align=left>",
  1063.       $query->textfield(-name=>'pro_host_prefix',
  1064.             -default=>$hash{"pro_host_prefix"},
  1065.             -size=>$size, -maxlength=>7),
  1066.       "</tr>";
  1067.  
  1068.     print "<tr><th align=left>Generate new IP addresses from this range:\n",
  1069.       "<th align=left>",
  1070.       $query->textfield(-name=>'pro_ipaddress_range',
  1071.             -default=>$hash{"pro_ipaddress_range"},
  1072.             -size=>$size, -maxlength=>256),
  1073.       "</tr>";
  1074.  
  1075.     print "<tr><th align=left>Subnet mask for this network:\n",
  1076.       "<th align=left>",
  1077.       $query->textfield(-name=>'pro_netmask',
  1078.             -default=>$hash{"pro_netmask"},
  1079.             -size=>$size, -maxlength=>16),
  1080.       "</tr>";
  1081.  
  1082.     print "<tr><th align=left>NIS domain name for this network:\n",
  1083.       "<th align=left>",
  1084.       $query->textfield(-name=>'pro_nis_domain',
  1085.             -default=>$hash{"pro_nis_domain"},
  1086.             -size=>$size, -maxlength=>256),
  1087.       "</tr>";
  1088.  
  1089.     print "<tr><td></td><td>\n";
  1090.     print qq|<input type=submit name="adv" value="Go to Advanced Options">|;
  1091.     print "</td></tr>";
  1092.  
  1093.     print "</table></center><br>\n";
  1094.  
  1095.     print &js_buttons('save_config','Ok','onClick="markOK()"','onClick="markOther()"');
  1096.  
  1097.     print $query->endform;
  1098. }
  1099.  
  1100.  
  1101.